import { Request, Response } from "express";

// mock接口
export default {
  // 简写写法
  "POST /api/admin/login": {
    code: 0,
    data: {
      token: "token123"
    },
    msg: "ok"
  },
  // 自定义函数写法
  "GET /api/admin/userInfo": (req: Request, res: Response) => {
    res.status(200).json({
      code: 0,
      data: {
        name: "admin"
      },
      msg: "ok"
    });
  }
};
